/* 聊天界面主容器 */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* 聊天头部 */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: #f8f9fa;
  border-bottom: 1px solid #e8eaed;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.config-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
  color: #6c757d;
}

.config-btn:hover {
  background: #e9ecef;
  color: #495057;
}

.chat-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #202124;
}

/* 主内容区域 */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0; /* 确保flex子元素可以收缩 */
}

/* 消息区域 */
.chat-messages {
  flex: 1;
  padding: 24px 40px;
  overflow-y: auto;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0; /* 确保flex子元素可以收缩 */
  position: relative; /* 确保滚动容器正确定位 */
  align-items: center; /* 消息内容居中 */
}


.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}


/* 打字指示器 */
.typing-indicator {
  display: flex;
  align-items: center;
  margin: 16px 0;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e8eaed;
}

.typing-dots {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: #4285f4;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.typing-text {
  color: #5f6368;
  font-size: 14px;
}

/* 响应式设计 */

@media (max-width: 768px) {
  .chat-container {
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
  
  .chat-header {
    padding: 16px 20px;
  }
  
  .chat-header h1 {
    font-size: 20px;
  }
  
  .chat-messages {
    padding: 16px 20px;
  }
}

